package personal.lijun.skeleton.springcloud.utils.validate;

import com.google.common.collect.Maps;
import personal.lijun.skeleton.springcloud.common.data.ApiResultSet;

import java.util.Map;

/**
 * @Auther: lijun@sstcsoft.com
 * @Date: 2019-10-11 16:54
 */
public final class WrapApiResultBeanHelper {

    public static  <T> T wrapBean(T target){
        Map<String,Object> maps = Maps.newHashMap();
        maps.put("code",ApiResultSet.SUCCESS);
        maps.put("message","执行成功!");
        return  (T)ReflectUtil.getTarget(target,maps);
    }
}
